package cn.iocoder.yudao.module.eval.controller.admin.monitoring.vo;

import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 评价实施监控分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class EvalMonitoringDataPageReqVO extends PageParam {

    @Schema(description = "计划ID", example = "1")
    private Long planId;

    @Schema(description = "科目ID", example = "1")
    private Long subjectId;

    @Schema(description = "监控类型", example = "attendance")
    private String monitorType;

    @Schema(description = "预警级别", example = "1")
    private Integer alertLevel;

    @Schema(description = "是否已处理", example = "true")
    private Boolean isHandled;

    @Schema(description = "监控状态", example = "1")
    private Integer monitorStatus;

    @Schema(description = "处理状态", example = "1") 
    private Integer handleStatus;

    @Schema(description = "监控时间开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime monitorTimeStart;

    @Schema(description = "监控时间结束")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime monitorTimeEnd;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime[] createTime;

    // Mapper期望的方法
    public LocalDateTime[] getMonitorTime() {
        if (monitorTimeStart != null && monitorTimeEnd != null) {
            return new LocalDateTime[]{monitorTimeStart, monitorTimeEnd};
        }
        return null;
    }

} 